import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

const history = createWebHistory()

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: 'animation'
  },
  {
    path: '/animation',
    name: 'animation',
    component: () => import('../views/Animation.vue')
  },
  {
    path: '/car',
    name: 'car',
    component: () => import('../views/Car.vue')
  },
  {
    path: '/earthAndMoon',
    name: 'earthAndMoon',
    component: () => import('../views/EarthAndMoon.vue')
  }
]

const router = createRouter({
  history,
  routes
})

export default router
